package net.togogo.controller;


import net.togogo.entity.TbProduct;
import net.togogo.service.TbProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author qmk
 * @since 2019-23
 */
@RestController
@RequestMapping("/product")
public class TbProductController {

    @Autowired
    TbProductService productService;

    @GetMapping("/findAll")
    public List<TbProduct> findAll(){
        return productService.selectList(null);
    }

}

